﻿
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;

namespace Domain.Context
{
    public partial class RepositoryContext : DbContext
    {
        private readonly ILoggerFactory loggerFactory;
        public RepositoryContext()
        {
        }
        public RepositoryContext(DbContextOptions<RepositoryContext> options, ILoggerFactory loggerFactory) : base(options)
        {
            this.loggerFactory = loggerFactory;
        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseLoggerFactory(this.loggerFactory);
            base.OnConfiguring(optionsBuilder);
            optionsBuilder.EnableSensitiveDataLogging();
        }


    }
}
